package com.cy.service;


import com.cy.bfzcommons.mapper.PictureMapper;
import com.cy.bfzcommons.pojo.Picture;
import com.cy.bfzcommons.service.PictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PictureServiceImpl implements PictureService {
    @Autowired
    private PictureMapper pictureMapper;


    @Override
    public void savePicture(Picture picture) {
        pictureMapper.insert(picture);
    }

    @Override
    public void updatePicture(Picture picture) {
        pictureMapper.updateById(picture);
    }

    @Override
    public void deletePicture(Integer pictureId) {
        pictureMapper.deleteById(pictureId);
    }

    @Override
    public Picture getPicture(Integer pictureId) {
       return pictureMapper.selectById(pictureId);
    }


}
